cmake_minimum_required(VERSION 3.8)
project(pdfgen LANGUAGES C)

add_library(pdfgen ${PDFGEN_SRC_DIR}/pdfgen.c)
set_target_properties(pdfgen PROPERTIES
    PUBLIC_HEADER ${PDFGEN_SRC_DIR}/pdfgen.h
    WINDOWS_EXPORT_ALL_SYMBOLS ON
    C_EXTENSIONS OFF
    C_STANDARD 99
)

include(GNUInstallDirs)

install(
    TARGETS pdfgen
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
